package com.example;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class ClientApplication {

    @DubboReference(url = "dubbo://192.168.11.24:20880/com.example.UserService")
    UserService userService;

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ClientApplication.class, args);

        UserService userService = run.getBean(UserService.class);
        String value = userService.getUserName(55);
        System.out.println(value);
    }
}
